/*
 * @Author: lusx 
 * @Date: 2020-05-14 16:08:37 
 * @Last Modified by: lusx
 * @Last Modified time: 2020-05-21 17:49:04
 */
import React from 'react';
import { Route, Switch } from 'react-router-dom';
import { asyncComponent } from 'react-async-component';
const coms = {
  Main: asyncComponent({ //政务(长列表)容器
    resolve: () => import('../main')
  }),
  Info: asyncComponent({ //详情页面
    resolve: () => import('../info')
  }),
  Overall: asyncComponent({
    resolve: () => import('../page/quickbar/statistics/overall')
  }),
  Status: asyncComponent({
    resolve: () => import('../page/quickbar/statistics/status')
  }),
}

export default () => {
    return (
        <Switch>
            <Route path="/pro/:mainTab/info/:which" component={coms.Info} />
            <Route path="/task/:mainTab/info/:which" component={coms.Info} />
            <Route path='/pro' name='pro' render={() => (<coms.Main selectKey='0' />)} />
            <Route path='/task' name='task' render={() => (<coms.Main selectKey='1' />)} />
        </Switch>
    )
}
